xen: arm: provide and use a handle_raz_wi helper
authorIan Campbell <ian.campbell@citrix.com>
Mon, 30 Mar 2015 11:33:49 +0000 (12:33 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Fri, 8 May 2015 10:50:48 +0000 (11:50 +0100)
commit7d1a4458c4232831f05e93d05261c2fdd6ee2b16
tree415f5483e4f5408539981071a968297b884a17c4
parent4af6a538949635f39b34bae307c8d2ec10809da5
xen: arm: provide and use a handle_raz_wi helper

Reduces the use of goto in the trap handlers to none.

Some explicitly 32-bit types become register_t here, but that's OK, on
32-bit they are 32-bit already and on 64-bit it is fine/harmless to
set the larger register, a 32-bit guest won't see the top half in any
case.

Per section B1.2.1 (ARMv8 DDI0487 A.d) writes to wN registers are zero
extended, so there is no risk of leaking the top half here.

Unlike the previous code the advancing of PC is handled within the
helper, rather than after the end of the switch as before. So return
as the handler is called.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Reviewed-by: Julien Grall <julien.grall@citrix.com>
xen/arch/arm/traps.c